//
//  ProductCell.m
//  caiPiao
//
//  Created by 梅杰 on 16/8/6.
//  Copyright © 2016年 梅杰. All rights reserved.
//

#import "ProductCell.h"

@interface ProductCell ()

@end

@implementation ProductCell

//- (instancetype)init{
//    if (self = [super init]) {
//        UIImageView *imageView = [UIImageView alloc] initWithFrame:CGRectMake(5, 0, self.frame, <#CGFloat height#>);
//    }
//    return self;
//}

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(5, 0, self.frame.size.width - 10,self.frame.size.height - 20)];
        self.imageView = imageView;
        imageView.layer.cornerRadius = 5;
        imageView.layer.masksToBounds = YES;
        [self.contentView addSubview:imageView];
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake( 5, self.frame.size.height - 25, self.frame.size.width - 10, 15)];
        label.textAlignment = NSTextAlignmentCenter;
        label.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:label];
        self.label = label;
    }
    return self;
}

@end
